package com.woniuxy.user.mapper;/**
 * @Description：
 * @Author：曹杰克
 * @CreateTime：2022/10/28 11:40
 */

import com.hc.entity.NoticeArriva;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *@Description：
 *@CreateTime：2022/10/28 11:40
 *@Author：曹杰克
 */
@Mapper
public interface NoticeArrivaMapper {

    @Insert("insert hc_noticearriva (user_id,goods_id ,status) values (#{user.id},#{goods.id},'y') ")
    void addNoticeArriva(NoticeArriva noticeArriva);

   @Select("select * hc_noticearriva where user_id = #{user.id} and goods_id=#{goods.id}) ")
   NoticeArriva selectNoticeArrivaByUserId(NoticeArriva noticeArriva);

   @Delete("delete hc_noticearriva  where user_id = #{user.id} and goods_id=#{goods.id})")
   void deleteNoticeArrivaByUserId(NoticeArriva noticeArriva);

    @Select("select * hc_noticearriva  goods_id=#{goods.id}) ")
    List<NoticeArriva> selectGoodNoticeByGoodsId(NoticeArriva noticeArriva);
}
